import java.util.Scanner;

public class test7 {
    // 在同一个类中,分别定义求两个整数的方法 和 三个小数之和的方法。 并执行代码，求出结果
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入两个整数:");
        int x1 = sc.nextInt();
        int x2 = sc.nextInt();
        int sum1 = getSum(x1,x2);
        System.out.println(x1+"和"+x2+"的和为:"+sum1);

        System.out.println("请输入三个小数:");
        double f1 = sc.nextDouble();
        double f2 = sc.nextDouble();
        double f3 = sc.nextDouble();
        double sum2 = getSum(f1,f2,f3);
        System.out.println(f1+"、"+f2+"、"+f3+"的和为:"+sum2);
    }
    public static int getSum(int a,int b){
        return a+b;
    }
    public static double getSum(double a,double b,double c){
        return a+b+c;
    }
}
